<template>
  <div id="app">
    <HelloWorld v-model="list">
      <div class='a'  v-for='item of list' :key="item.id" @click="www">{{item.value}}</div>
    </HelloWorld>

    <HelloWorld v-model="list2">
      <div class='a'  v-for='item of list2'  :key="item.id">{{item.value}}</div>
    </HelloWorld>
  </div>
</template>

<script>
import HelloWorld from './components/HelloWorld.vue'

export default {
  name: 'App',
  data(){
    return {
      list:[
        {value:1,id:1},
        {value:2,id:2},
        {value:3,id:3},
        {value:4,id:4},
      ],
      list2:[]
    }
  },
  mounted() {
    
  },
  methods: {
    www(){
      //  alert(1)
    }
  },
  components: {
    HelloWorld
  }
}
</script>

<style>
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
}
.a{
  padding: 20px;
}
</style>
